package com.bum.api.bo;

import java.util.List;

import org.apache.log4j.Logger;

import com.bum.rss.exp.IRssService;
import com.bum.rss.exp.om.Rss;
import com.bum.rss.exp.om.RssEntry;

public class RssBO {
	static Logger	log	= Logger.getLogger(RssBO.class);

	IRssService		rssService;

	public List<RssEntry> getSitemap() {
		return rssService.getSitemap();
	}

	public Rss load(String url, String userName) {
		try {
			Rss rss = rssService.load(url, userName);
			return rss;
		} catch (Throwable e) {
			log.debug(url + " : " + e.getMessage());
		}
		return null;
	}

	public int getHotRssSlotCount() {
		return 200;
	}

	/**
	 * SETTERS
	 */
	public void setRssService(IRssService rssService) {
		this.rssService = rssService;
	}
}
